<%@ page import="R.Entity.Doctor" %>
<%@ page import="java.util.List" %>
<%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<!doctype html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport"
              content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>医生信息表</title>
        <link rel="stylesheet" href="/res/css/RegShowAll.css" type="text/css"/>
    </head>
    <body>
        <p>医生信息查询</p>
        <form action="/Doctor" method="post">
            <div id="div2">输入科室名称：<input type="text" name="department_name"/></div>
            <div id="div3">医生姓名：<input type="text" name="doctor_name"/></div>
            <input type="submit" value="查询"/>
        </form>
        <table border="0" frame=hsides>
            <tr>
                <th>医生编号</th>
                <th>科室名称</th>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
                <th>职称</th>
                <th>查看详细</th>
            </tr>
            <%
                List<Doctor> list = (List<Doctor>) request.getAttribute("DoctorList");
                if (list != null) {
                    for (int i = 0; i < list.size(); i++) {
                        Doctor r = list.get(i);
                        out.println("<tr>");
                        out.println("<td>" + r.getDoctor_number() + "</td>");//医生编号
                        out.println("<td>" + r.getDepartment_name() + "</td>");//科室名称
                        out.println("<td>" + r.getDoctor_name() + "</td>");//医生姓名
                        out.println("<td>" + r.getDoctor_gender() + "</td>");//医生性别
                        out.println("<td>" + r.getDoctor_age() + "</td>");//医生年龄
                        out.println("<td>" + r.getDoctor_title() + "</td>");//医生职称
                        out.println("<td><a href=''>>详情</a></td>");
                        out.println("</tr>");
                    }
                }
            %>
        </table>
    </body>
</html>